﻿CREATE PROCEDURE [dbo].[vk_Approve]
	@personId NVARCHAR(128),
	@partnerId NVARCHAR(128)
AS
BEGIN
	SET @personId = LTRIM(RTRIM(LOWER(@personId)))
	SET @partnerId = LTRIM(RTRIM(LOWER(@partnerId)))

	UPDATE [dbo].[vk_Relations]
	SET [Approve] = 1
	WHERE [UserId] = @personId AND [PartnerId] = @partnerId AND [Complete] = 1

END